During operation of an automatic sewing machine that includes a sewing needle and an X-Y table, a pallet holding a workpiece and attached to the X-Y table is first moved by the X-Y table to a start sewing position, which is defined in a sewing program particularly for the workpiece, such that the workpiece is under the sewing needle, and the X-Y table is then controlled to move the pallet according to the sewing program so the workpiece can be sewed along a trail defined by the sewing program. However, there may be inaccuracy in the position of the sewing needle relative to a coordinate system of the automatic sewing machine in which the X-Y table is controlled to move, so the workpiece may be sewed inappropriately even if the X-Y table is controlled to move the pallet according to the sewing program.
Conventionally, calibration of a needle position relative to a coordinate system of an automatic sewing machine is performed manually by an operator of the sewing machine who makes slight adjustments to a position where the pallet is attached to the X-Y table of the automatic sewing machine until he/she finds that the needle is accurately positioned above a position of the workpiece that is to be sewed first with his/her naked eye. The aforementioned approach is labor intensive, and the accuracy of calibration is limited to human judgment (about +/−0.2 mm). Moreover, since the calibration is performed manually for the particular pallet attached to the X-Y table of the automatic sewing machine, this approach needs to be performed repeatedly for different sewing programs and pallets.